[data-scope="image-cropper"][data-part="viewport"] {
  position: relative;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

[data-scope="image-cropper"][data-part="selection"] {
  position: absolute;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: move;
  touch-action: none;
}

[data-scope="image-cropper"][data-part="selection"][data-shape="circle"] {
  border-radius: 50%;
}

[data-scope="image-cropper"][data-part="image"] {
  display: block;
  pointer-events: none;
  user-select: none;
}

[data-scope="image-cropper"][data-part="handle"] {
  position: absolute;
  width: 30px;
  height: 30px;
  touch-action: none;
  cursor: grab;
}

[data-scope="image-cropper"][data-part="handle"] > div {
  width: 10px;
  height: 10px;
  background: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

[data-scope="image-cropper"][data-part="handle"][data-position="top-left"] {
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  cursor: nwse-resize;
}

[data-scope="image-cropper"][data-part="handle"][data-position="top"] {
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: ns-resize;
}

[data-scope="image-cropper"][data-part="handle"][data-position="top-right"] {
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  cursor: nesw-resize;
}

[data-scope="image-cropper"][data-part="handle"][data-position="right"] {
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
  cursor: ew-resize;
}

[data-scope="image-cropper"][data-part="handle"][data-position="bottom-right"] {
  bottom: 0;
  right: 0;
  transform: translate(50%, 50%);
  cursor: nwse-resize;
}

[data-scope="image-cropper"][data-part="handle"][data-position="bottom"] {
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  cursor: ns-resize;
}

[data-scope="image-cropper"][data-part="handle"][data-position="bottom-left"] {
  bottom: 0;
  left: 0;
  transform: translate(-50%, 50%);
  cursor: nesw-resize;
}

[data-scope="image-cropper"][data-part="handle"][data-position="left"] {
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  cursor: ew-resize;
}

.image-cropper-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;

  h3 {
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
  }

  .preview-button {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    padding-inline: 1rem;
    padding-block: 0.5rem;
    background: var(--colors-bg-primary-subtle);
    color: #ffffff;
    border: none;
  }

  .preview-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border: 1px solid var(--colors-border-subtle);
  }
}
